﻿@model IEnumerable<GZNest.Entity.Spin.System.Product>

@{
    ViewBag.Title = "Product Overview";
}

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<div class="row">
    <div class="col-md-6">
        <div class="panel panel-default ">
            <div class="panel-heading">
                Machine Overview
            </div>
            <table class="table">
                <tr>
                    <th>
                        @Html.DisplayNameFor(model => model.Name)
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.Description)
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.Enabled)
                    </th>
                    <th></th>
                </tr>

                @foreach (var item in Model)
                {
                    <tr>
                        <td>
                            @Html.DisplayFor(modelItem => item.Name)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.Description)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.Enabled)
                        </td>
                        <td>
                            @Html.ActionLink("Edit", "Edit", new { id = item.Id }, new { @class = "btn btn-primary btn-sm" }) |
                            @*@Html.ActionLink("Details", "Details", new { id=item.Id }) |*@
                            @Html.ActionLink("Delete", "Delete", new { id = item.Id }, new { @class = "btn btn-danger btn-sm" })
                        </td>
                    </tr>
                }

            </table>
        </div>
    </div>
</div>
